const { Sequelize, DataTypes } = require('sequelize');

const sequelize = require('../connect'); // Adjust the path as necessary

const Station = sequelize.define('Station', {
    id: {
        type: DataTypes.INTEGER,
        autoIncrement: true,
        primaryKey: true
    },
    name: {
        type: DataTypes.STRING,
        allowNull: false
    },
    avatar: {
        type: DataTypes.STRING,
        allowNull: true
    },
    recordedAt: {
        type: DataTypes.DATE,
        allowNull: false,
        defaultValue: DataTypes.NOW
    }

}, {
    tableName: 'stations',
    timestamps: false
});


console.log("==> The table for the Station model was just (re)created!");
module.exports = Station;